<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .button {
            width: 100px;
            height: 30px;
            line-height: 30px;
            position: relative;
            border: none;
            outline: none;
            cursor: pointer;
            background-color: transparent;
        }

        .button span {
            text-align: center;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .button::after, .button::before, .button span::after, .button span::before {
            content: "";
            position: absolute;
            width: 0;
            height: 0;
        }

        .button:hover:after, .button:hover:before {
            will-change: transform, opacity;
            width: 100%;
        }

        .button:hover span::after, .button:hover span::before {
            will-change: transform, opacity;
            height: 100%;
        }

        /*上*/

        .button::before {
            top: 0px;
            left: 0px;
            border-top: 2px solid #566473;
            transition: all 0.3s ease;
            transition-delay: 0.8s;
            -moz-transition-delay: 0.8s; /* Firefox 4 */
            -webkit-transition-delay: 0.8s; /* Safari 和 Chrome */
            -o-transition-delay: 0.8s; /* Opera */
        }

        .button:hover::before {
            transition-delay: 0s;
            -moz-transition-delay: 0s; /* Firefox 4 */
            -webkit-transition-delay: 0s; /* Safari 和 Chrome */
            -o-transition-delay: 0s; /* Opera */
        }

        /*右*/
        .button span::after {
            top: 0px;
            right: 0px;
            border-right: 2px solid #566473;
            transform: rotate(180deg);
            transform-origin: 100% 50%;
            transition: all 0.2s ease;
            transition-delay: 0.5s;
            -moz-transition-delay: 0.5s; /* Firefox 4 */
            -webkit-transition-delay: 0.5s; /* Safari 和 Chrome */
            -o-transition-delay: 0.5s; /* Opera */

        }
        .button:hover span::after {
            transition-delay: 0.3s;
            -moz-transition-delay: 0.3s; /* Firefox 4 */
            -webkit-transition-delay: 0.3s; /* Safari 和 Chrome */
            -o-transition-delay: 0.3s; /* Opera */
            transform: rotate(180deg);
        }
        /*下*/
        .button::after {
            bottom: 0px;
            right: 0px;
            border-bottom: 2px solid #566473;
            transition: all 0.3s ease;
            transition-delay: 0.2s5
            -moz-transition-delay: 0.2s; /* Firefox 4 */
            -webkit-transition-delay: 0.2s; /* Safari 和 Chrome */
            -o-transition-delay: 0.2s; /* Opera */
        }
        .button:hover::after {
            transition-delay: 0.5s;
            -moz-transition-delay: 0.5s; /* Firefox 4 */
            -webkit-transition-delay: 0.5s; /* Safari 和 Chrome */
            -o-transition-delay: 0.5s; /* Opera */
        }
        /*左*/
        .button span::before {
            bottom: 0px;
            left: 0px;
            border-left: 2px solid #566473;
            transform: rotate(180deg);
            transform-origin: 0% 50%;
            transition: all 0.2s ease;
            transition-delay: 0s;
            -moz-transition-delay: 0s; /* Firefox 4 */
            -webkit-transition-delay: 0s; /* Safari 和 Chrome */
            -o-transition-delay: 0s; /* Opera */
        }

        .button:hover span::before {
            transform: rotate(180deg);
            transition-delay: 0.8s;
            -moz-transition-delay: 0.8s; /* Firefox 4 */
            -webkit-transition-delay: 0.8s; /* Safari 和 Chrome */
            -o-transition-delay: 0.8s; /* Opera */
        }

    </style>
</head>
<body>
<button class="button">
    <span>按钮</span>
</button>
</body>
</html>